local qingchuang = fk.CreateSkill {

  name = "joyex__qingchuang",

  tags = {  },

}



qingchuang:addEffect("active", {
  name = "joyex__qingchuang",
  prompt = "#joyex__qingchuang",
  can_use = function (self,player)
    return player:usedSkillTimes(qingchuang.name, Player.HistoryPhase) < 1 and player:getMark("@joyex__chuang") > 0
  end,
  target_num = 0,
  card_num = 1,
  card_filter = function(self, player, to_select, selected)
    if #selected == 0  then
      local card = Fk:getCardById(to_select)
        return card.name == "peach" or card.name == "analeptic"
    end
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local cards = effect.cards
    room:throwCard(cards,qingchuang.name,player,player)
    if not player.dead then
      room:removePlayerMark(player,"@joyex__chuang",1)
      player:drawCards(1,qingchuang.name)
    end
  end,
})

return qingchuang